home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
DATABASE
/
ULTIMATE
/
a252drag.txt
< prev
next >
Wrap
Internet Message Format
|
1993-08-09
|
1KB
From: mhardy@acorn.co.uk (Michael Hardy)
Subject: Re: Real Icon Dragging.
Date: 8 Oct 92 09:17:36 GMT
Organization: Acorn Computers Ltd, Cambridge, England
>The easiest way (although it is cheating somewhat) is to type
>*FX 162,28,3. This enables solid icon drags with shadows.
Without wishing to sound too critical, this is not a good way to do it,
since you are also altering the state of seven other bits which control
other aspects of FileSwitch and the Wimp. A better way is to read the byte,
set bit 1, and then write it back. This is the program that I use:
REM Toggle state of DragASprite bit in CMOS
REM Read byte
SYS "OS_Byte",161,&1C TO ,,byte%
REM EOR byte with mask for bit 1
byte% = byte% EOR 1<<1
REM Write byte back again
SYS "OS_Byte",162,&1C,byte%
END
You *must* use the OS_Byte calls, otherwise the checksum byte will become
incorrect. This byte is calculated on a power-on reset, and then maintained
by the OS_Byte calls (in other words, they don't recalculate it, but merely
update it in a manner that is appropriate to the changes made).
The other thing to note is that you *must* do a power-on reset when
upgrading from RISC OS 2 to RISC OS 3, not just to initialise the checksum,
but more importantly because the CMOS usage differs between the versions.
- Michael J Hardy